package ystp.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import ystp.model.Tongkeyaopin;
import ystp.model.TongkeyaopinExample;

public interface TongkeyaopinMapper {

    List<Map<String,Object>> findTongkeBiaojueByXiangmuId(@Param("xiangmuid") String ppxiangmuId,@Param("userid") String ppuserId, @Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);

    List<Map<String,Object>> findTongkeyaopinResultByXiangmuId(@Param("xiangmuid") String ppxiangmuId);

    List<Map<String,Object>> findTongkeyaopinByXiangmuId(@Param("xiangmuid") String ppxiangmuId,



                                                         @Param("startindex") int ppStartIndex,
                                                         @Param("pagesize") int ppPageSize);

    Object countTongkeByXiangmuId(@Param("xiangmuid") String ppxiangmuId,
                                  @Param("drugname") String ppdrugname,
                                  @Param("jiyao") String ppjiyao,
                                  @Param("tongguopingjia") String pptongguopingjia,
                                  @Param("jicaiyao") String ppjicaiyao,
                                  @Param("yuxuanyijian") String ppyuxuanyijian);

    List<Map<String,Object>> findResultByXiangmuIdAndUserid(@Param("xiangmuid") String ppxiangmuId,
                                                         @Param("userid") String ppuserId,
                                                            @Param("drugname") String ppdrugname,
                                                            @Param("jiyao") String ppjiyao,
                                                            @Param("tongguopingjia") String pptongguopingjia,
                                                            @Param("jicaiyao") String ppjicaiyao,
                                                            @Param("yuxuanyijian") String ppyuxuanyijian,

                                                            @Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findGuizebianhaoByXiangmuId(@Param("xiangmuid") String ppxiangmuId);

    int countByExample(TongkeyaopinExample example);

    int deleteByExample(TongkeyaopinExample example);

    int deleteByPrimaryKey(String id);

    int insert(Tongkeyaopin record);

    int insertSelective(Tongkeyaopin record);

    List<Tongkeyaopin> selectByExample(TongkeyaopinExample example);

    Tongkeyaopin selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Tongkeyaopin record, @Param("example") TongkeyaopinExample example);

    int updateByExample(@Param("record") Tongkeyaopin record, @Param("example") TongkeyaopinExample example);

    int updateByPrimaryKeySelective(Tongkeyaopin record);

    int updateByPrimaryKey(Tongkeyaopin record);
}